<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta charset="UTF-8">
	<title>模态框传值</title>
	
	<link rel="stylesheet"  href="__ROOT__/static/css/bootstrap.min.css" />
</head>
<body  >
	<pre>

			{literal}
			{volist name="data" id="vo"}
			&lt;div class="btn btn-primary btn-sm " data-toggle="modal" data-target=".modleDailog" onclick="values('{$vo.id}')"&gt;删除订单 可变id&lt;/div&gt;
			
			{/volist}
			{/literal}

	&lt;div class="btn btn-primary btn-sm " data-toggle="modal" data-target=".modleDailog" onclick="values(1)"&gt;删除1订单&lt;/div&gt;
&lt;div class="btn btn-primary btn-sm " data-toggle="modal" data-target=".modleDailog" onclick="values(2)"&gt;删除订单&lt;/div&gt;
&lt;div class="btn btn-primary btn-sm " data-toggle="modal" data-target=".modleDailog" onclick="values(3)"&gt;删除订单&lt;/div&gt;
&lt;button class="btn btn-primary btn-sm " data-toggle="modal" data-target=".modleDailog" onclick="values(4)"&gt;删除4&lt;/button&gt;

&lt;div class="modal fade modleDailog" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel"&gt;
	&lt;div class="modal-dialog modal-sm" role="document"&gt;
	  &lt;div class="modal-content"&gt;
			  &lt;div class="modal-header"&gt;
			  &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&times;&lt;/span&gt;&lt;/button&gt;
			  &lt;h4 class="modal-title" id="myModalLabel"&gt;Modal title&lt;/h4&gt;
		  &lt;/div&gt;
			
		  &lt;div class="modal-body"&gt;
			  &lt;input type="" name="dateId" id="dateId" value="" /&gt;
		  &lt;/div&gt;
		  &lt;div class="modal-footer"&gt;
			  &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
			  &lt;button type="button" class="btn btn-primary"&gt;Save changes&lt;/button&gt;
		  &lt;/div&gt;
	  &lt;/div&gt;
	&lt;/div&gt;
&lt;/div&gt;


&lt;script type="text/javascript"&gt;

	$(function(){
		$('.modleDailog').modal("hide");
	});
	
	function values(ID){
			$('#dateId').val(ID);
	}
&lt;/script&gt;

&lt;script src="__ROOT__/static/js/jquery.min.js"&gt;&lt;/script&gt;
&lt;script src="__ROOT__/static/js/bootstrap.min.js"&gt;&lt;/script&gt;
	
	</pre>
	
	

<P>列表 确认删除 传值给模态框</P>

{volist name="data" id="vo"}
<div class="btn btn-primary btn-sm " data-toggle="modal" data-target=".modleDailog" onclick="values('{$vo.id}')">删除订单 可变id</div>

{/volist}

<div class="btn btn-primary btn-sm " data-toggle="modal" data-target=".modleDailog" onclick="values(1)">删除1订单</div>
<div class="btn btn-primary btn-sm " data-toggle="modal" data-target=".modleDailog" onclick="values(2)">删除订单</div>
<div class="btn btn-primary btn-sm " data-toggle="modal" data-target=".modleDailog" onclick="values(3)">删除订单</div>
<button class="btn btn-primary btn-sm " data-toggle="modal" data-target=".modleDailog" onclick="values(4)">删除4dfdsf</button>

<div class="modal fade modleDailog" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
	<div class="modal-dialog modal-sm" role="document">
	  <div class="modal-content">
			  <div class="modal-header">
			  <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			  <h4 class="modal-title" id="myModalLabel">Modal title</h4>
		  </div>
			
		  <div class="modal-body">
			  <input type="" name="dateId" id="dateId" value="" />
		  </div>
		  <div class="modal-footer">
			  <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
			  <button type="button" class="btn btn-primary">Save changes</button>
		  </div>
	  </div>
	</div>
</div>


<script type="text/javascript">
   /*
	$(function(){
		$('.modleDailog').modal("hide");
	});
	*/
	function values(ID){
			$('#dateId').val(ID);
	}
</script>

<script src="__ROOT__/static/js/jquery.min.js"></script>
<script src="__ROOT__/static/js/bootstrap.min.js"></script>

</body>
</html>